<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/login.css" />
</head>
<body>
	
	<div class="container">
		<div class="logo_box">
			<h2>药店云管家</h2>
			<!-- <div class="input_outer">
				<span class="u_user"></span>
				<input id="username" type="text" class="text" placeholder="请输入账户">
			</div> -->
			<div class="input_outer">
				<span class="us_uer"></span>
				<input id="password" type="password" class="text" placeholder="请输入密码">
			</div>
			<div class="mb2">
				<a class="act-but submit" href="javascript:;" id="submit">登录</a>
			</div>
		</div>
	</div>
	
<script src="/layui/layui.js"></script>
<script>
layui.use(['jquery','layer'],function(){
	var $ = layui.jquery;
	var layer = layui.layer;

	$("#submit").on("click", function(){
		$.post("/login", {password:$("#password").val()}, function(data){
			if(data){
				location.href="/index";
			}else{
				layui.layer.msg("密码错误");
			}
		});
	});

});
</script>
</body>
</html>